package com.duanjw.springcloud.nacos.config.client.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 将配置文件中 user 开头的配置注入到此对象
 *
 * @author duanjw
 */
@Configuration
@ConfigurationProperties(prefix = "user")
public class UserProperties {

    private String username;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public String toString() {
        return "UserProperties{" +
                "username='" + username + '\'' +
                '}';
    }
}